import { TouchableHighlight, View } from 'react-native'
import Svg, { Path } from 'react-native-svg'

type WH = {
    size?: number
    color?: string
    onPress?: Function
    style?: any
}

type Children = any

type SvgPath = {
    color?: string
    path: string
}

const SvgIcon = ({ size, onPress, children, style }: WH & Children) => {
    if (onPress)
        return (
            <TouchableHighlight
                underlayColor='transparent'
                style={style}
                onPress={() => {
                    onPress && onPress()
                }}
            >
                <Svg width={size || 26} height={size || 26} viewBox='0 0 1024 1024'>
                    {children}
                </Svg>
            </TouchableHighlight>
        )
    return (
        <View style={style}>
            <Svg width={size || 26} height={size || 26} viewBox='0 0 1024 1024'>
                {children}
            </Svg>
        </View>
    )
}

const Svgs = {
    home: (props: WH) => {
        return (
            <SvgIcon {...props}>
                <Path
                    d='M768 790.56l-128-0.032v-118.944a128.224 128.224 0 0 0-128-128.192c-70.592 0-128 57.504-128 128.192v118.88l-128-0.032V364.992l255.68-167.52L768 365.376v425.184z m-192-0.032l-128-0.032v-118.912c0-35.392 28.704-64.192 64-64.192s64 28.8 64 64.192v118.944z m304.896-427.68L800 309.856V207.168a32 32 0 1 0-64 0v60.768l-206.464-135.296A31.296 31.296 0 0 0 511.424 128a31.168 31.168 0 0 0-17.6 4.64l-351.36 230.208a32 32 0 0 0 35.072 53.536L192 406.912v393.056c0 30.08 27.2 54.592 60.576 54.592h518.848c33.408 0 60.576-24.512 60.576-54.592v-392.64l13.856 9.056a31.968 31.968 0 0 0 35.04-53.536z'
                    fill='#333'
                    p-id='1185'
                />
            </SvgIcon>
        )
    },
    my: (props: WH) => {
        return (
            <SvgIcon {...props}>
                <Path
                    d='M189.42470615 876.97974395c-0.63317109 0-1.29062461-0.03417714-1.99844472-0.10342969-0.30309434 0.01888682-0.60708867 0.03417714-0.91827774 0.03417715-11.38717969 0-20.65089903-9.26641758-20.65089902-20.65539551 0-92.45641465 36.0061875-179.37978047 101.38466161-244.76005283 39.62623359-39.62893183 88.15013437-69.06057715 140.97581807-85.61835088-29.59173721-16.95800214-54.68382422-40.91595908-73.05656748-69.87452519-21.21571582-33.43842862-32.42931328-72.0933205-32.42931328-111.78610929 0-115.38906592 93.87835049-209.26561817 209.27101466-209.26561816 115.38906592 0 209.26381904 93.87655137 209.26381904 209.26561816 0 39.69368789-11.21269747 78.34857979-32.42571505 111.78610929-18.37274326 28.95946523-43.46303203 52.91652217-73.05476923 69.87542431 52.82208633 16.55327724 101.34508799 45.98492256 140.97401982 85.61835088 65.37847324 65.38027237 101.38466162 152.3054373 101.38376162 244.76005283 0 9.84562471-6.99725567 18.35655469-16.64591396 20.25516709-1.45791123 0.31208818-2.92481719 0.46858271-4.36114336 0.46858271L189.42470615 876.97974395zM816.1485875 835.67794678l-0.24823213-3.96091407 0.36875039 0c-12.56897812-157.82949141-145.17956865-280.6843957-304.26820576-280.6843957-159.08863799 0-291.69922763 122.8549043-304.26730664 280.6843957l0.36155479 0-0.24553389 3.96091406L816.1485875 835.67794678zM512.00089912 176.25583496c-7.56836895 0-15.24376494 0.52344492-22.813033 1.55594531-82.86082031 11.23967988-145.34325703 82.86531768-145.34325704 166.60933858 0 92.72173448 75.43455557 168.15629003 168.15629004 168.15629003s168.15629003-75.43545469 168.15629004-168.15629003c0-83.63699385-62.39249824-155.25004043-145.12920205-166.57965879C527.38317002 176.78917285 519.63672237 176.25583496 512.00089912 176.25583496z'
                    fill='#333'
                    p-id='1329'
                />
            </SvgIcon>
        )
    },
    rightArrors: (props: WH) => {
        return (
            <SvgIcon {...props}>
                <Path
                    d='M534.61333333 490.98666667L262.29333333 143.04c-3.2-4.16-8.21333333-6.50666667-13.44-6.50666667H166.4c-7.14666667 0-11.09333333 8.21333333-6.72 13.76L442.77333333 512 159.68 873.70666667c-4.37333333 5.54666667-0.42666667 13.76 6.72 13.76h82.45333333c5.22666667 0 10.24-2.45333333 13.44-6.50666667l272.32-347.84c9.70666667-12.48 9.70666667-29.76 0-42.13333333z m324.26666667 0L586.56 143.04c-3.2-4.16-8.21333333-6.50666667-13.44-6.50666667H490.66666667c-7.14666667 0-11.09333333 8.21333333-6.72 13.76L767.04 512 483.94666667 873.70666667c-4.37333333 5.54666667-0.42666667 13.76 6.72 13.76h82.45333333c5.22666667 0 10.24-2.45333333 13.44-6.50666667l272.32-347.84c9.70666667-12.48 9.70666667-29.76 0-42.13333333z'
                    fill='#eee'
                />
            </SvgIcon>
        )
    },
    sound: (props: WH) => {
        return (
            <SvgIcon {...props}>
                <Path
                    fill='#4886f8'
                    d='M736.12109375 395.984375c-13.18359375-21.09375-29.00390625-36.9140625-36.9140625-44.82421875-7.91015625-7.91015625-23.73046875-7.91015625-31.640625 2.63671875-7.91015625 7.91015625-7.91015625 23.73046875 2.63671875 31.640625 2.63671875 2.63671875 5.2734375 5.2734375 7.91015625 7.91015625 7.91015625 7.91015625 15.8203125 18.45703125 21.09375 29.00390625 47.4609375 71.19140625 47.4609375 147.65625-31.640625 229.39453125-7.91015625 7.91015625-7.91015625 23.73046875 0 31.640625 7.91015625 7.91015625 23.73046875 7.91015625 31.640625 0C791.4921875 583.19140625 791.4921875 482.99609375 736.12109375 395.984375z'
                    p-id='1137'
                />
                <Path
                    fill='#4886f8'
                    d='M828.40625 293.15234375c-13.18359375-21.09375-29.00390625-39.55078125-44.82421875-58.0078125-7.91015625-10.546875-15.8203125-15.8203125-21.09375-21.09375-7.91015625-7.91015625-23.73046875-7.91015625-31.640625 2.63671875-7.91015625 7.91015625-7.91015625 23.73046875 2.63671875 31.640625 2.63671875 2.63671875 10.546875 7.91015625 18.45703125 18.45703125 13.18359375 15.8203125 26.3671875 31.640625 39.55078125 52.734375 87.01171875 131.8359375 87.01171875 276.85546875-58.0078125 427.1484375-7.91015625 7.91015625-7.91015625 23.73046875 0 31.640625 7.91015625 7.91015625 23.73046875 7.91015625 31.640625 0C925.96484375 609.55859375 925.96484375 440.80859375 828.40625 293.15234375z'
                    p-id='1138'
                />
                <Path
                    fill='#4886f8'
                    d='M488.26953125 161.31640625l-179.296875 152.9296875-89.6484375 0c-47.4609375 0-89.6484375 39.55078125-89.6484375 89.6484375l0 224.12109375c0 50.09765625 39.55078125 89.6484375 89.6484375 89.6484375l79.1015625 0 189.84375 150.29296875c44.82421875 34.27734375 87.01171875 13.18359375 87.01171875-42.1875l0-622.265625C575.28125 145.49609375 530.45703125 124.40234375 488.26953125 161.31640625zM530.45703125 823.1328125c0 18.45703125-2.63671875 18.45703125-15.8203125 7.91015625l-195.1171875-152.9296875c-2.63671875-2.63671875-7.91015625-5.2734375-13.18359375-5.2734375l-87.01171875 0c-23.73046875 0-44.82421875-21.09375-44.82421875-44.82421875l0-224.12109375c0-23.73046875 21.09375-44.82421875 44.82421875-44.82421875l97.55859375 0c5.2734375 0 10.546875-2.63671875 13.18359375-5.2734375l184.5703125-158.203125c13.18359375-10.546875 13.18359375-10.546875 13.18359375 5.2734375L527.8203125 823.1328125z'
                    p-id='1139'
                />
            </SvgIcon>
        )
    }
}

export default Svgs
